<template>
  <div class="decription">
    <div class="content-main">
      <div class="segment segment-1">
        <div class="segment-title">天然气进气量(m³)</div>
        <span class="segment-label">{{ description.trqjql | noDataFormat }}</span>
      </div>
      <div class="segment segment-2">
        <div class="segment-title">发电功率(kW)</div>
        <span class="segment-label">{{ description.fdgl | noDataFormat }}</span>
      </div>
      <div class="segment segment-3">
        <div class="segment-title">供热功率(kW)</div>
        <span class="segment-label">{{ description.grgl | noDataFormat }}</span>
      </div>
      <div class="segment segment-4">
        <div class="segment-title">供冷功率(kW)</div>
        <span class="segment-label">{{ description.glgl | noDataFormat }}</span>
      </div>
      <div class="segment segment-5">
        <div class="segment-title">转换效率(%)</div>
        <span class="segment-label">{{ description.zhgl | noDataFormat }}</span>
      </div>
    </div>
    <div class="content-sub">
      <div class="segment segment-1">
        <div class="content">
          <div class="content-row">
            <span class="title">当日耗气量：</span>
            <span class="label is-label--sussess"
              >{{ description.drhql | noDataFormat }}m³</span
            >
          </div>
          <div class="content-row">
            <span class="title">当月耗气量：</span>
            <span class="label is-label--sussess"
              >{{ description.dyhql | noDataFormat }}m³</span
            >
          </div>
          <div class="content-row">
            <span class="title">当年耗气量：</span>
            <span class="label is-label--sussess"
              >{{ description.dnhql | noDataFormat }}m³</span
            >
          </div>
          <div class="content-row">
            <span class="title">累计耗气量：</span>
            <span class="label is-label--sussess"
              >{{ description.ljhql | noDataFormat }}m³</span
            >
          </div>
        </div>
      </div>
      <div class="segment segment-2">
        <div class="content">
          <div class="content-row">
            <span class="title">当日发电量：</span>
            <span class="label is-label--warning"
              >{{ description.drfdl | noDataFormat }}kWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">当月发电量：</span>
            <span class="label is-label--warning"
              >{{ description.dyfdl | noDataFormat }}MWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">当年发电量：</span>
            <span class="label is-label--warning"
              >{{ description.dnfdl | noDataFormat }}MWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">累计发电量：</span>
            <span class="label is-label--warning"
              >{{ description.ljfdl | noDataFormat }}MWh</span
            >
          </div>
        </div>
      </div>
      <div class="segment segment-3">
        <div class="content">
          <div class="content-row">
            <span class="title">当日供热量：</span>
            <span class="label is-label--normal"
              >{{ description.drgrl | noDataFormat }}kWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">当月供热量：</span>
            <span class="label is-label--normal"
              >{{ description.dygrl | noDataFormat }}MWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">当年供热量：</span>
            <span class="label is-label--normal"
              >{{ description.dngrl | noDataFormat }}MWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">累计供热量：</span>
            <span class="label is-label--normal"
              >{{ description.ljgrl | noDataFormat }}MWh</span
            >
          </div>
        </div>
      </div>
      <div class="segment segment-4">
        <div class="content">
          <div class="content-row">
            <span class="title">当日供冷量：</span>
            <span class="label is-label--error"
              >{{ description.drgll | noDataFormat }}kWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">当月供冷量：</span>
            <span class="label is-label--error"
              >{{ description.dygll | noDataFormat }}MWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">当年供冷量：</span>
            <span class="label is-label--error"
              >{{ description.dngll | noDataFormat }}MWh</span
            >
          </div>
          <div class="content-row">
            <span class="title">累计供冷量：</span>
            <span class="label is-label--error"
              >{{ description.ljgll | noDataFormat }}MWh</span
            >
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { coldHotEleDetails } from "@/api/scada";
export default {
  name: "description",
  props: {},
  data() {
    return {
      description: {}
    };
  },
  mounted() {
    coldHotEleDetails().then((res) => {
      const { result, code } = res;
      if (code === 200) {
        this.description = result || {};
      }
    });
  },
  watch: {},
  methods: {

  },
  components: {}
};
</script>

<style scoped lang="scss">
.content-main {
  display: flex;
  .segment {
    flex: 1;
    padding-left: 70px;
    position: relative;
  }
  .segment + .segment {
    margin-left: 20px;
  }
  .segment::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    width: 60px;
    height: 60px;
    background-position: center;
    background-size: 100%;
    background-repeat: no-repeat;
  }
  .segment.segment-1::before {
    background-image: url("../../../../assets/img/coldHotElectric/5.png");
  }
  .segment.segment-2::before {
    background-image: url("../../../../assets/img/coldHotElectric/6.png");
  }
  .segment.segment-3::before {
    background-image: url("../../../../assets/img/coldHotElectric/7.png");
  }
  .segment.segment-4::before {
    background-image: url("../../../../assets/img/coldHotElectric/9.png");
  }
  .segment.segment-5::before {
    background-image: url("../../../../assets/img/coldHotElectric/8.png");
  }
  .segment-title {
    font-size: 14px;
    font-weight:400;
    color: #343434;
  }
  .segment-label {
    font-size: 24px;
    color: #343434;
  }
}
.content-sub {
  margin-top: 10px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  .segment + .segment {
    border-left: 1px dashed #e8e8e8;
    margin-left: 46px;
    padding-left: 46px;
  }
  .segment {
    padding-top: 10px;
    flex: 1;
    .segment-title {
      font-size: 14px;
      color: #333;
    }
    .segment-label {
      font-size: 24px;
      color: #333;
    }
  }

  .content {
    padding: 10px;
    background: #f7f7f7;
  }
  .content-row {
    line-height: 28px;
    padding-left: 28px;
    position: relative;
  }
  .content-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    width: 18px;
    height: 18px;
    background-position: center;
    background-size: 100%;
    background-repeat: no-repeat;
  }
  .title {
    margin-right: 30px;
  }
  .segment.segment-1 {
    .content-row:before {
      background-image: url("../../../../assets/img/coldHotElectric/1.png");
    }
  }
  .segment.segment-2 {
    .content-row:before {
      background-image: url("../../../../assets/img/coldHotElectric/13.png");
    }
  }
  .segment.segment-3 {
    .content-row:before {
      background-image: url("../../../../assets/img/coldHotElectric/10.png");
    }
  }
  .segment.segment-4 {
    .content-row:before {
      background-image: url("../../../../assets/img/coldHotElectric/11.png");
    }
  }
}

.label.is-label--sussess {
  color: #92d66e;
}
.label.is-label--warning {
  color: #ff9a00;
}
.label.is-label--normal {
  color: #47a4f8;
}
.label.is-label--error {
  color: #fc807e;
}
</style>
